//===============================================================================
// Microsoft Architecture Strategy Team
// LitwareHR - SaaS Sample Application
//===============================================================================
// Copyright  Microsoft Corporation.  All rights reserved.
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY
// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
// LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
// FITNESS FOR A PARTICULAR PURPOSE.
//===============================================================================
// The example companies, organizations, products, domain names,
// e-mail addresses, logos, people, places, and events depicted
// herein are fictitious.  No association with any real company,
// organization, product, domain name, email address, logo, person,
// places, or events is intended or should be inferred.
//===============================================================================


//===============================================================================
// Microsoft Architecture Strategy Team
// LitwareHR - S+S Sample Application
//===============================================================================
// Copyright  Microsoft Corporation.  All rights reserved.
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY
// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
// LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
// FITNESS FOR A PARTICULAR PURPOSE.
//===============================================================================
// The example companies, organizations, products, domain names,
// e-mail addresses, logos, people, places, and events depicted
// herein are fictitious.  No association with any real company,
// organization, product, domain name, email address, logo, person,
// places, or events is intended or should be inferred.
//===============================================================================

using System;
using System.Collections.Generic;
using System.Text;
using System.ServiceModel;
using System.Runtime.Serialization;
using Shp.Runtime.Contract;
using Microsoft.Practices.ObjectBuilder;
   
namespace LitwareHR.PublicApp.WinUX.ServiceProxy
{
    namespace UnSecure
    {
        public class DataModelService : ClientBase<IDatamodelUC>, IDatamodelUC
        {
            #region IDatamodelUC Members

                public StringPair[][] GetInstanceList(string tenantAlias, string entityDefName, Guid[] listToRetrieve)
                {
                    return base.Channel.GetInstanceList(tenantAlias, entityDefName, listToRetrieve);
                }

                public StringPair[] GetViewDefFields(string tenantAlias, string viewDefName)
                {
                    return base.Channel.GetViewDefFields(tenantAlias, viewDefName);
                }

                public StringPair[] GetViewDefFieldsById(string tenantAlias, Guid viewDefId)
                {
                    return base.Channel.GetViewDefFieldsById(tenantAlias, viewDefId);
                }

                public EntityField[] GetEntityDefFields(string tenantAlias, string entityDefName)
                {
                    return base.Channel.GetEntityDefFields(tenantAlias, entityDefName);
                }

                public Dictionary<Guid, string> GetEntityDefList()
                {
                    return base.Channel.GetEntityDefList();
                }

                public Dictionary<Guid, string> GetViewDefList()
                {
                    return base.Channel.GetViewDefList();
                }

                public GuidStringPair[] GetTypeList()
                {
                    return base.Channel.GetTypeList();
                }

                #endregion            
        }
    }

    namespace Secure
    {
        public class DataModelService : ClientBase<IDatamodelSC>, IDatamodelSC
        {
            #region IDatamodelSC Members

            public void UpdateViewDef(Guid viewDefId, StringPair[] fields)
            {
                base.Channel.UpdateViewDef(viewDefId, fields);
            }

            public void UpdateEntityDef(Guid entityDefId, EntityField[] fields)
            {
                base.Channel.UpdateEntityDef(entityDefId, fields);
            }

            public Guid AddInstance(string entityDefName, EntityField[] fields)
            {
                return base.Channel.AddInstance(entityDefName, fields);
            }

            #endregion
        }
    }
}
